<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: YKMZ
  Date: 2022/9/19
  Time: 17:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>pageContext作用域</title>
</head>
<body>
    <h1>application作用域：【当前应用内有效】</h1>
    <%
        //3. 再从当前页面取出数据
        List<String> books = (List<String>) application.getAttribute("books");
        //4. 打印图书
        if (books != null) {
            for (String book : books) {
                out.println(book + "<br>");
            }
        }
    %>

</body>
</html>
